﻿<!DOCTYPE html>
<html>
<head>
    <title>CGI</title>
</head>
<body>
    <h1>Our Page</h1>
    <!--01-->
    <script>
        var lineItemCount = 3;
        var currentItem = 0;
        while (currentItem < lineItemCount) {
            console.log("item: " + currentItem);
            currentItem++;
        }
    </script>
    <!--02 & remove addition operator-->
    <!--<script>
        var lineItemCount = 3;
        var currentItem = 0;
        while (currentItem < lineItemCount)
            console.log("item: " + currentItem++);
    </script>-->
    <!--03-->
    <!--<script>
        var lineItemCount = 3;
        var currentItem = 0;
        do {
            console.log("item: " + currentItem);
            currentItem++;
        } while (currentItem < lineItemCount);
    </script>-->
    <!--04-->
    <!--<script>
        var lineItemCount = 3;
        var currentItem = undefined;
        do {
            console.log("item: " + currentItem);
            currentItem++; //undefined
        } while (currentItem < lineItemCount); //undefined
    </script>-->
</body>
</html>